package world.zwq.gulimall.search.vo;

import lombok.Data;
import world.zwq.common.to.es.SkuEsModel;

import java.util.List;

/**
 * @author zhangwq
 * @date 2021/8/8 8:51
 */
@Data
public class SearchResult {
    /**
     * 所有商品信息
     */
    private List<SkuEsModel> products;
    /**
     * 页数
     */
    private Integer pageNum;
    /**
     * 总记录数
     */
    private Long total;
    /**
     * 总页码
     */
    private Integer totalPages;
    /**
     * 当前查询到的结果
     */
    private List<BrandVo> brands;
    /**
     * 当前结果所有的属性
     */
    private List<AttrVo> attrs;
    /**
     * 当前结果涉及到的所有分类
     */
    private List<CatalogVo> catalogs;

    //上面是返回给页面的所有信息

    @Data
    public static class BrandVo{
        private Long brandId;

        private String brandName;

        private String brandImg;
    }

    @Data
    public static class AttrVo{
        private Long attrId;

        private String attrName;

        private List<String> attrValue;
    }

    @Data
    public static class CatalogVo{
        private Long catalogId;

        private String catalogName;

    }

}
